<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/jsplib/pubhead.jsp"%>
<%@ page import="net.comm.common.ValueMaping" %>
<%@ taglib uri="/WEB-INF/myTaglib.tld" prefix="tag"%>
<%@ taglib prefix="myfn" uri="/WEB-INF/jstlfun.tld" %>
<%@ taglib uri="/WEB-INF/c.tld"  prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="x-ua-compatible" content="ie=7" />
	<TITLE>我的相册:i友邻社区</TITLE>
	<link rel="stylesheet" type="text/css" href="${cpath}/css/main.css" />
	<link rel="stylesheet" type="text/css" href="${cpath}/css/leftmenu.css" />
	<link rel="stylesheet" type="text/css" href="${cpath}/css/layout.css">
	<link rel="stylesheet" type="text/css" href="${cpath}/css/group.css" />
	
</head>
<body>
<script> 
	function change_width(img_name,wid,hei)
	{
		var CurImage=new Image();
		if(CurImage.src!=img_name.src)
		{
			CurImage.src=img_name.src;
		}
		var img_width = CurImage.width;
		var img_height = CurImage.height;
		img_name.width = img_width;
		img_name.height = img_height;

		if(img_height/hei > img_width/wid)
		{
			if( img_height > hei)
			{
				img_name.width = img_name.width/img_name.height*hei;
				img_name.height = hei;
			}
		}
		else
		{
			if( img_width > wid)
			{
				img_name.height = img_name.height/img_name.width*wid;
				img_name.width = wid;
			}
		}
		return true;
	}
</script>

 	<!-- 页首 {{{ -->
	<%@ include file="/menu.jsp"%>
   
	<div id="mainBody">
	<%@ include file="/leftmenu.jsp"%>

		<DIV id=group>

		<!-- 右侧宽栏 {{{ -->
		<DIV class=group_mid>

			<div class='subtop' >
					<p><a ><img src="${cpath}/images/fm.jpg" ></a></p>
				<dl >
					<dt class="tit"><a href="${cpath}/qunzu_${theForm.qryGroupID}">${myfn:getGroupName(theForm.qryGroupID)}</a>&nbsp;&gt;&nbsp;<a >相册</a></dt>
					<dd class="intro">&nbsp;</dd>
				</dl>
				<div class='fun'>
					<li><a href="javascript:history.go(-1);">返回上一页</a></li>
					<li><a href="javascript:history.go(-1);">创建新相册</a></li>
				</div>
			</div>

			<form action="${cpath}/galbum.do" name="theForm"  method="post" enctype="multipart/form-data" >
			<DIV class='whole'><!-- 右侧宽栏 }}}-->
	
				<c:forEach var="album" items="${albumlist}" varStatus="status">   
				<div class='album' >
					<p><a href="${cpath}/qunzu_${theForm.qryGroupID}/xiangce_${album.GAlbumID}"><img src="${cpath}/${album.folder}${album.name}" onload="change_width(this,130,98)"></a></p>
					<dl >
						<dt class="tit"><c:out value="${album.albumname}"></c:out></span></dt>
						<dd class="info">共：<span>${album.num}&nbsp;张</span></dd>
						<dd class="info">创建时间：<span>${myfn:formatDate14(album.CTime, "-")}</span></dd>
						<dd class="intro">介绍：<span>${album.albuminfo}</span></dd>						
					</dl>
				</div>
				</c:forEach>
				<div class='album' >
					<p><a href="${cpath}/qunzu_${theForm.qryGroupID}/xiangce_${album.GAlbumID}"><img src="${cpath}/${album.folder}${album.name}" onload="change_width(this,130,98)"></a></p>
					<dl >
						<dt class="tit"><c:out value="${album.albumname}"></c:out></span></dt>
						<dd class="info">共：<span>${album.num}&nbsp;张</span></dd>
						<dd class="info">创建时间：<span>${myfn:formatDate14(album.CTime, "-")}</span></dd>
						<dd class="intro">介绍：<span>${album.albuminfo}</span></dd>						
					</dl>
				</div>
				<div class='album' >
					<p><a href="${cpath}/qunzu_${theForm.qryGroupID}/xiangce_${album.GAlbumID}"><img src="${cpath}/${album.folder}${album.name}" onload="change_width(this,130,98)"></a></p>
					<dl >
						<dt class="tit"><c:out value="${album.albumname}"></c:out></span></dt>
						<dd class="info">共：<span>${album.num}&nbsp;张</span></dd>
						<dd class="info">创建时间：<span>${myfn:formatDate14(album.CTime, "-")}</span></dd>
						<dd class="intro">介绍：<span>${album.albuminfo}</span></dd>						
					</dl>
				</div>
				<div class='album' >
					<p><a href="${cpath}/qunzu_${theForm.qryGroupID}/xiangce_${album.GAlbumID}"><img src="${cpath}/${album.folder}${album.name}" onload="change_width(this,130,98)"></a></p>
					<dl >
						<dt class="tit"><c:out value="${album.albumname}"></c:out></span></dt>
						<dd class="info">共：<span>${album.num}&nbsp;张</span></dd>
						<dd class="info">创建时间：<span>${myfn:formatDate14(album.CTime, "-")}</span></dd>
						<dd class="intro">介绍：<span>${album.albuminfo}</span></dd>						
					</dl>
				</div>
				<div class='album' >
					<p><a href="${cpath}/qunzu_${theForm.qryGroupID}/xiangce_${album.GAlbumID}"><img src="${cpath}/${album.folder}${album.name}" onload="change_width(this,130,98)"></a></p>
					<dl >
						<dt class="tit"><c:out value="${album.albumname}"></c:out></span></dt>
						<dd class="info">共：<span>${album.num}&nbsp;张</span></dd>
						<dd class="info">创建时间：<span>${myfn:formatDate14(album.CTime, "-")}</span></dd>
						<dd class="intro">介绍：<span>${album.albuminfo}</span></dd>						
					</dl>
				</div>

				<ul class="detailinfo">
				<li>
				<input type="hidden" name='qryGroupID' value='${theForm.qryGroupID}'/>
				<!-- 分页主键 formName字段当前的form名称 -->
				<%@ include file="/jsplib/page.jsp" %>
				<!--隐藏域-->
				<input type="hidden" name='action' value='list'/>
				<li>
				</ul>
			</div>		
			</form>

		</DIV><!-- profile_mid }}} -->
		</DIV><!-- group end }}} -->
	<DIV class="clear"></DIV>
	<%@ include file="/indexfoot.jsp"%>
	</DIV><!--cont end-->
</body>
</html>
<!---->

<script>

    /**
     * 检查项目资料维护
     */
	function doConfirm()
	{
		var form = document.theForm;

		var action = form['action'];

    form.submit();
	}

	/**
   * 根据具体请求设置各个组件状态	
   */
  function showState()
	{
		var action = '${theForm.action}';
		var form = document.theForm;		
		if(action == 'detail')
		{
           
			document.getElementById("back").style.display = "none";

		}
		else if(action == 'modifyPage' || action == 'update')
		{

			form['action'].value = 'update';
		}

	}
	showState();


</script>

